It is well known to generate customised documents, either manually or using an automated system, from precedents or templates.
If this is done manually, then a printed standard form or other precedent, containing blank spaces for particular relevant information, will be filled in and edited on each specific occasion it is used. Instructions may be included in the standard document to help the user insert the correct or appropriate information.
If this is done using an automated system, then an electronically stored document or template will be used, in conjunction with various logical rules and other criteria, to prompt the user for the correct information and to assemble a customised document by associating various relevant rules with variables within the template. For example, the HotDocs™ system, using a library of Form Templates, which store both static and dynamic areas of text, that are initially customised by the user, in conjunction with a questionnaire to produce a completed customised document. Necessary information relevant to the dynamic text areas may either be input directly by a user, or gathered from an Answer File. The Answer File contains information which is repeatedly used in the same or similar customised document. Various logical rules and calculation criteria are used to associate information with the template to produce a final customised document. This document may then be edited, printed or stored.
Other known automated systems include that described in WO01/04772. In this system, a server computer runs a document generation program and is capable of communicating with local or remote client computers over a local area network (LAN) or a wide area network (WAN), such as the internet. A standard document, comprising various items of known information and associated logical rules, is first translated into a form suitable for processing by the document generation program. When instructed to generate a customised document, the server first generates one or more web pages which are sent to client computers for user input of the further information required to evaluate the logical rules. Users may then submit the further information to the server. Once all the required further information has been captured, the server generates a customised document on the basis of the standard document and received further information.
Both of these automated methods produce documents in known word processing formats, such as Microsoft Word. These final documents are static. However, the nature of production of the final document means that there are difficulties in ensuring that the result of the manipulation of optional or conditional text is correct.
An example of the problems of text manipulation is considered below. In a parties clause in a contract, information is included regarding the supplier of a particular good or service. The information includes conditional text according to the type of supplier.
There are two types of spaces that may need to be inserted depending upon the conditional text remaining in a generated document, leading spaces and trailing spaces. (In the following examples, the space characters discussed are double underlined for clarity.)
Leading Spaces
Space characters are consistently placed at the start of the conditional texts and at the start of the unconditional text following the final conditional text:{NAME}[Type IS ‘Registered Company’ (company number {CompanyNumber})][Type IS ‘Registered Charity’ (charity number {CharityNumber})][Type IS ‘Registered Company’OR Type IS ‘Registered Charity’ whose registered office is at {BusinessAddress}][Type IS ‘Individual’ of {PrivateAddress} ](‘the supplier’)Trailing Spaces
Space characters are consistently placed at the end of the conditional texts and at the end of the unconditional text that precedes the first conditional text:{NAME} [Type IS ‘Registered Company’(company number {CompanyNumber}) ][Type IS ‘Registered Charity’(charity number {CharityNumber}) ][Type IS ‘Registered Company’ OR Type IS ‘Registered Charity’ whose registered office is at {BusinessAddress} ][Type IS ‘Individual’ of {PrivateAddress} ](‘the supplier’)
In the above example, the situations of leading spaces and trailing spaces are effectively equivalent, as the same clause text is generated for registered companies:ABC Software (company number ABC/123) whose registered office at ABC House (‘the supplier’)for registered charities:ABC Trust (charity number ABC/123) whose registered office is at ABC House (‘the supplier’)and for individuals:Anthony B. Copeland of Unit 1, ABC House (‘the supplier’).
However, in more complex clauses, the insertion of space characters can easily go wrong. In the situation where both leading and trailing spaces are necessary, space characters are placed consistently at the start and end of conditional and unconditional texts:{NAME}=[Type IS ‘Registered Company’ (company number {CompanyNumber}) ][Type IS ‘Registered Charity’ (charity number {Charity Number}) ][Type IS ‘Registered Company’ OR Type IS ‘Registered Charity’ whose registered office is at {BusinessAddress} ][Type IS ‘Individual’ of {PrivateAddress} ] (‘the supplier’)This generates clause text for registered companies with double spacing throughout:ABC Software (company number ABC/123) whose registered office is at ABC House (‘the supplier’)
A further situation where errors occur is where leading spaces are consistently used with one type of text and trailing spaces consistently used with another. For example, if trailing spaces are used for optional texts connected with company and charity numbers, and leading spaces used for address texts:{NAME} [Type IS ‘Registered Company’(company number {CompanyNumbber}) ][Type IS ‘Registered Charity’(registered charity number {CharityNumber}) ][Type IS ‘Registered Company’ OR Type IS ‘Registered Charity’ whose registered office is at {BusinessAddress}][Type IS ‘Individual’ of {PrivateAddress}] (‘the supplier’)
This generates clause text for registered companies with a double space between the company number and the registered office:ABC Software (company number ABC/123) whose registered office is at ABC House (‘the supplier’).Alternatively, leading spaces are used for optional text connected with company and charity numbers and trailing spaces for address texts:‘Registered Charity’(registered charity number {CharityNumber})  ][Type IS ‘Registered Company’ OR Type IS ‘Registered Charity’ whose registered office is at {BusinessAddress}][Type IS ‘Individual’ of {PrivateAddress}] (‘the supplier’)This generates clause text for registered companies that has no space between the company number and the registered office:ABC Software (company number ABC/123)whose registered office is at ABC House (‘the supplier’).
It is necessary to be able to include information contained in or related to conditional text in, both a fully or partially generated document. One particular issue is that in manipulation of conditional text during rule evaluation, the resulting text in the generated document may not be correctly spaced, for example, words may run together or several blank spaces may be inserted between words or phrases.
In existing systems, this problem also occurs, but must be dealt with using complex code which is either hard coded into an individual template, or hand encoded for each document. The main difficulties with hand encoding arise from the fact that the formulation of the space elements is directly related to the conditional text, and therefore requires change whenever the usage conditions change. Consequently, text is produced in a final document that includes more than one adjacent space character or where space characters are excluded between portions of text.